package com.jxufe.weather;

import org.apache.hadoop.io.Text;
import org.apache.hadoop.mapreduce.Partitioner;

public class WeaPartitioner extends Partitioner<Text, WeaBean> {


	@Override
	public int getPartition(Text key, WeaBean value, int numPartitions) {
		String str = key.toString().substring(3, 4);
		if (str == null)
			return 0;
		return Integer.valueOf(str);
	}

}
